<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
	  	#test{
	  		width: 200px;
	  		height: 200px;
	  		border: 1px solid yellow;
	  		text-align: center;
	  		color: lime;
	  		background-color: gray;
	  	}
	</style>
</head>
<body>
	<div id="test" onclick="bian();">
		<p>今天天气不错</p>
	</div>
</body>
<script type="text/javascript">

	function getStyle(el,attr){
		return el.currentStyle?el.currentStyle[attr]:getComputedStyle(el,null)[attr];
	}

	function bian(){
		var test = document.getElementById('test');
		var w = parseInt(getStyle(test,'width'));
		var h = parseInt(getStyle(test,'height'));
		var b = parseInt(getStyle(test,'borderBottomWidth'));
		test.style.width = w + 10 + 'px';
		test.style.height = h + 10 + 'px';
		test.style.borderBottomWidth = b + 2 + 'px';
	}
</script>
</html>